laterentalfandomcom-20200215-history
Help:Tooltips
=Telonica Tooltips= Mouseover tooltips are links which show additional information when you place your cursor over them, and can be useful if you are comparing, contrasting or viewing a series of abilities or items as you don't need to visit each article page individually. They are implemented on this wiki through extra javascript code on every page, so will only work if your browser has javascript enabled. For example, a quest reward may entail a choice of three items upon completion, and tooltips could be used so the reader can quickly compare each of the items and the bonuses that it offers: * * * Tooltips mimic the utility of mousing over items in your in-game inventory or skills in your ability book, and give a brief summary only. A tooltip should never be the only information on an article page - a description of how that object is used in practice, other details and information, and notes should also be added for completeness. They also won't be very useful for articles that describe things in the world of Telon that don't themselves have detailed in-game tooltips, such as NPCs, areas or guides and strategy. =When should I use a tooltip?= Well, I would suggest that if you get useful information by moving your mouse over that thing in the game, and the reader is going to benefit from a quick summary of that thing, a tooltip could be useful. Some examples where I have used tooltips include: * Items (weapons, armour, mounts, etc) that you can collect from quests, adventuring, diplomacy or so on, so that you can compare and contrast these items easily; * Diplomacy Cards that you would have in your deck, so that strategy pages can explain their use in different combinations without the reader having to check each page individually; * Abilities, so that if you are looking at a list of what your class can do, you can quickly see the range of different options that you have. There are probably more uses than what I have implemented, so if you feel that there is another kind of tooltip that is missing from this wiki, leave a message for me and I will see if we can add it in. =Using tooltips= To make tooltips work on Telonica, you need to use a special type of wikitext called Templates. Step 1: Add the detailed tooltip template to an article The first step is to make the article page itself, which contains all the detailed information about the object. It is important that the article has exactly the same name as the name of the item, ability or card, otherwise the tooltip will not work. At the top of the article before any other sections, type in two curled braces, then either ItemTooltip for items, CardTooltip for cards, or AbilityTooltip for spells and abilities, followed by two closing curled braces. For example, if I am creating a 'Union of Thought I' skill page, I would have at the very top: (Capitalisation does make a difference in templates (I think), so I have made sure to use a capitalised first letter as much as possible.) The curled braces tell the wiki to look for a template with the same name as the first word inside, and then insert (or transclude) the template style into the article at that point. For our tooltips, it will insert a right-aligned box on the page, following a format similar to what you would see in game tooltips. If you were to save the page at this point, all you would see is an empty box with no information inside, because we now need to set variables for each piece of information that we want to show up in the tooltip box. Step 2: Add variables to the detailed tooltip template Next, we use variables inside the curled braces of the template so that our tooltip contains the right information. Variables are useful because all the work of choosing colours, layout, and so on is already done for us in the way the template has been set up. To add a variable, start with a vertical pipe character (|) which separates it from the last bit of information, then insert the name of the variable followed by an equals sign and then the text we want to use for that variable, as in |varname=text For example, to add the skill name to our 'Union of Thought I' ability, we add the variable 'Name': You can keep adding variables in any order to the template, until all pieces of information that appear on the in-game tooltip are included: |Type=Alteration|Target=Self|Range=25|Cast=Instant|Level=1|Description=Forms a weak link with the minds of other psionicists in the world. Because the bond is weak, this link only increases energy regeneration by 2 every 6 sec.}} To know what the variable names are, check the appropriate template page, either Template:ItemTooltip, Template:CardTooltip or Template:AbilityTooltip. Once you have added all the information you need to the template, and then added the rest of the page text underneath, save the page and a tooltip box will appear on the right side of the finished article. Special Notes: * To find out what icon image to use, go to the Macro Icons page which has been set up by User:Crafter Dave. If you mouseover the icon you want, it will tell you a number, and then the image file is just Icon.png. * There are some templates that can be used inside other templates if there is special formatting required, some of these are: ** Template:Copper (eg. makes ) ** Template:Silver (eg. makes ) ** Template:Gold (eg. makes ) ** Template:Platinum (eg. makes ) ** Template:Energy (eg. makes ) ** Template:Endurance (eg. makes ) ** Template:HP (eg. makes Step 3: Link to the tooltip when you want a mouseover Now that you have added the content of the tooltip to the wiki, you can set up a tooltip link anywhere else on Telonica that refers to that information. This can by done by adding a Tooltip or TooltipLink template to the part of the page you want the link to appear in, with the item name as the only variable. For example, to refer to the 'Union of Thought I' skill that has a tooltip set up, you would use: which produces a link and mouseover script, as in: And you're done! Note that you can use the tooltip link template to refer to items which don't yet have tooltips on their pages, or even pages that aren't created yet, but you will get an error message when trying to mouse over the link, such as: =Further help= As I have set up the tooltips and templates, please feel free to leave me a message with your question or suggestion, and I will do my best to follow up! Have fun!